package com.cml.df.datasource.confmgr.api;

import com.cml.df.datasource.confmgr.application.DatasourceApplication;
import com.cml.df.datasource.confmgr.domain.entity.Datasource;
import com.cml.util.response.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 姓名：陈茂林
 * 时间：2024/11/22
 * 描述：
 */
@RestController
@RequestMapping("/datasource")
public class DatasourceControl {
    @Autowired
    private DatasourceApplication datasourceApplication;

    @PostMapping(value = "/saveDatasource")
     public ResponseData saveDatasource(Datasource datasource){
        datasourceApplication.saveDatasource(datasource);
        return ResponseData.success();
    }
}
